package servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;

import entity.Stuinfo;
import service.StuinfoService;

@WebServlet("/info")
public class StuinfoServlet extends HttpServlet{

	

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
		
		StuinfoService stuinfoService=new StuinfoService();
		List<Stuinfo> list=stuinfoService.getStuinfo();
		
		
		request.setAttribute("list", list);
		request.getRequestDispatcher("info.jsp").forward(request, response);
	}
	
}
